﻿using System;
using System.Collections.Generic;
using System.Text;
using SQLite;

namespace FileSystem.Models {
    /// <summary>
    /// 用户
    /// </summary>
    public class User {
        /// <summary>
        /// 用户名
        /// </summary>
        [PrimaryKey]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 权限
        /// </summary>
        public int Authority { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        public string Image { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        public static readonly List<string> images =
            new List<string> {"北北.png", "花花.png", "张张.png", "敏敏.png"};

    }

    public static class UserConst {
        public enum UserType
        {
            Administrator,
            GeneralUser
        }

        public enum Property {
            UserName,
            Password,
            Authority,
            Image,
            Description
        }

        public static IList<User> Users=new List<User> {
            new User {
                UserName="Administrator",
                Password = "123456",
                Authority = (int)UserConst.UserType.Administrator,
                Image="小张.png",
                Description="电脑拥有者兼超级管理员小张"
            }
        };
    }
}